using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

/// <summary>
/// Summary description for Order
/// </summary>
public class Order
{
    #region fields
    int id;
    DateTime date;
    Customer customer;
    string receiverAddress;
    #endregion
    #region constructors
    public Order()
    {
        id = -1;
        date = new DateTime();
        receiverAddress = "";
    }
    #endregion

    #region properties
    public int OrderID
    {
        get { return id; }
        set { id = value; }
    }
   public DateTime OrderDate
    {
        get { return date; }
        set { date = value; }
    }
    public Customer Customer
    {
        get { return customer; }
        set { customer = value; }
    }
    public string ReceiverAddress
    {
        get { return receiverAddress; }
        set { receiverAddress = value; }
    }
    #endregion

    #region methods
    public override bool Equals(object obj)
    {
        Order order = obj as Order;
        if (order == null) return false;
        return order.id == this.id;

        return base.Equals(obj);
    }
    #endregion
}
